<template>
  <div>
    <el-form ref="postRef" :model="form" label-width="auto" :label-position="labelPosition">
      <el-row :gutter="20">
        <template v-if="currentRedgerType != '14' && currentRedgerType != '15'">
          <el-col :span="span">
            <el-form-item label="计划" prop="plan">
              <el-select v-model="form.plan" placeholder="请选择计划" class="el-width" clearable>
                <el-option v-for="dict in plan_status" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="span">
            <el-form-item label="问题井" prop="problemWell">
              <el-select v-model="form.problemWell" placeholder="请选择问题井" filterable clearable>
                <el-option v-for="(item, index) in wellList" :key="index" :label="item" :value="item"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </template>


        <el-col :span="span">
          <el-form-item label="特殊资金" prop="specialFunds">
            <el-input v-model="form.specialFunds" placeholder="请输入特殊资金" />
          </el-form-item>
        </el-col>
        <el-col :span="span">
          <el-form-item label="备注" prop="remark">
            <el-input v-model="form.remark" placeholder="请输入备注" />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script setup lang="js">
import { ref } from 'vue';
import { getWellNo } from '@/api/income.js'


const gutter = ref(24)
const width =ref('120px')

const props = defineProps(['redgerType','span','labelPosition'])
const currentRedgerType = props.redgerType
const span =props.span
const labelPosition = props.labelPosition
// 字典引入
const { proxy } = getCurrentInstance();
const { plan_status } = proxy.useDict("plan_status");
const form = ref({})
const wellList = ref([])
//获取井号列表
const getWellList = () => {
  getWellNo().then(res => {
    wellList.value = res.data
  })
}
getWellList()
defineExpose({ form })
</script>
<style scoped></style>